package net.xo68.destiny.contract.domain.report;

/**
 * 报文序列化接口
 * @author wuxie
 * @version 2020-12-4
 */
public interface DatagramSerializer {

    <T> String serialize(T t) throws DatagramSerializationException;

    String decode(String encodeStr) throws DatagramSerializationException;

    <T> T deserialize(String decodeStr, Class<T> clazz) throws DatagramSerializationException;
}
